﻿using System;
using System.Collections.Generic;
using System.Text;
using CDHunter.Manager;

namespace CDHunter
{
    class Program
    {
        static void Main(string[] args)
        {
            string version = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString();
            Console.WriteLine("Version: {0}", version);

            List<CheckBrand> checkBrandList = new List<CheckBrand>();
            checkBrandList = CheckBrandFactory.GetCheckBrands();

            List<String> productInfoTestingOutPathList = new List<string>();

            foreach (CheckBrand cb in checkBrandList)
            {
                Console.WriteLine("Scanning Site {0} ...", cb.BrandName);

                //Execute Tasks
                cb.ExecuteTasks();

                //Add CheckBrand OutPath to outPathList
                productInfoTestingOutPathList.Add(cb.ProductInfoTestOutPath);
            }

            Console.WriteLine("Scanning Completed!");

            //Compare XML Files and Generate Compare Reports
            XMLCompareManager.GenerateXMLCompareReports(productInfoTestingOutPathList);

            Console.WriteLine("Finished!");
            Console.Read();
        }
    }
}
